<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@page import="java.util.*" %>
<script src="js/components/blocked/popup/popup.js"></script>
<script src="js/jquery-ui-1.9.1.custom.min.js"></script>
<%
	String Code = (String)session.getAttribute("LanguageCode");
	String SubCode = (String)session.getAttribute("LanguageSubcode");
	Locale locale = new Locale(Code, SubCode);
	ResourceBundle resource = ResourceBundle.getBundle("resource", locale);
%>

<input name="hotelId" id="hotelId" type="hidden" value="<%=session.getAttribute("hotelId")%>"/>

<div id="BookingDetailsS" style="display:none">
<form>
	<table width="572" border="0">
	<tr>
		<td><span class="guestname" style="color:#0000FF; font-weight:bold;">-</span></td>
		<td><div style="float:right;padding-right:20;"><span style="font-weight:bold;"><% out.print(resource.getString("simpleLabel.roomType"));%> :</span><span class="roomtypename" >-</span></div></td>
		<td><span style="font-weight:bold;"><% out.print(resource.getString("simpleLabel.room"));%> :</span> <span class="roomId">-</span></td>
	</tr>
	</table>

	<hr>
	<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="2" ><span style="font-weight:bold;"><% out.print(resource.getString("simpleLabel.Guest"));%> : </span><span class="guestname" style="color:#0000FF;">-</span> (Guest ID : <span class="guestId">-</span> )</td>
		<td colspan="2" ><span style="font-weight:bold;color:#0000FF;"><% out.print(resource.getString("Popup.stayDetail"));%></span></td>
	</tr>
	<tr>
		<td width="55" >&nbsp;</td>
		<td width="302" rowspan="5" align="left" valign="top"><span class="address">-</span></td>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("detailInformation.checkInDate"));%> :&nbsp;</span> <span class="dateCheckin">-</span></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("detailInformation.checkOutDate"));%> : &nbsp;</span><span class="dateCheckout">-</span></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("detailInformation.roomNight"));%> :&nbsp;</span><span class="daySpan">-</span></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("simpleLabel.adult"));%> : &nbsp;</span><span class="adult">-</span></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("simpleLabel.child"));%> :&nbsp;</span><span class="child">-</span></td>
	</tr>
	<tr>
		<td colspan="2" >&nbsp;</td>
		<td colspan="2" >&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
		<td style="width:129px;font-weight:bold;"><% out.print(resource.getString("Popup.TotalAmount"));%> : </td>
		<td style="width:164px;text-align:right; padding-right:100;"><span class="total">null</span></td>
	</tr>
	<tr>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("Popup.agency"));%> : </span><span class="agency">-</span></td>
		<td style="font-weight:bold;"><% out.print(resource.getString("Popup.paid"));%> : </td>
		<td style="text-align:right; padding-right:100;"><span class="pay">null</span></td>
	</tr>
	<tr>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("Popup.phone"));%> : </span><span class="tel">-</span></td>
		<td style="font-weight:bold;"><% out.print(resource.getString("Popup.balance"));%> : </td>
		<td style="text-align:right; padding-right:100;"><span class="remain">null</span></td>
	</tr>
	<tr>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("Popup.email"));%> : </span><span class="email">null</span></td>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2"><span style="font-weight:bold;"><% out.print(resource.getString("Popup.rateType"));%></span> : <span class="seasonalRate">-</span></td>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
		<td colspan="2">&nbsp;</td>
	</tr>
	</table>
	<hr>
	<table width="572" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="65"><input type="button" name="button" id="button" value="พิมพ์ใบจอง" class="btn"/></td>
			<td width="65"><input type="button" name="button2" id="button2" value="ส่งอีกเมลล์" class="btn"/></td>
			<td width="65"><input type="button" name="button3" id="button3" value="ส่งอีกเมลล์กลุ้ม" class="btn"/></td>
			<td width="239">&nbsp;</td>
			<td width="56"><input type="button" name="btnEditS" id="btnEditS" value="แก้ไข" class="btn" onclick="CallEditReservedPageWithLoadElement(id,$('#BookingDetailsS').get(0).resId)"/></td>
			<td width="56"><input type="button" name="button5" id="closeS" value="ปิด" class="btn" onclick="closeDialog(id);"/></td>
		</tr>
	</table>
</form>
</div>

<div id="BookingDetailsG" style="display:none">
	<form >
	<table width="572" border="0">
		<tr>
			<td><strong><font color="#0000FF"><span class="guestname">null</span></font></strong></td>
			<td><div style="float:right;padding-right:20;"><strong>ชนิดห้องพัก :</strong>&nbsp;<span class="roomtypename">null</span></div></td>
			<td><strong>ห้อง :</strong>&nbsp;<span class="roomId"> 107</span></td>
		</tr>
	</table>

	<hr>
	<table width="572" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
			<td colspan="2"><strong>เจ้าของกลุ่ม : </strong><font color="#0000FF"><span class="ownerName">null</span></font><span id="tagOwner"> (Guest ID : P</span><span class="ownerId">1267</span> <span id="tagOwne2r"> )</span></td>
			<td colspan="2"><strong><font color="#0000FF">รายละเอียดการพัก</font></strong></td>
		</tr>
		<tr>
			<td colspan="2" >&nbsp;</td>
			<td colspan="2"><strong>วันที่เช็คอิน :&nbsp;</strong><span class="dateCheckin">null</span></td>
		</tr>
		<tr>
			<td colspan="2" ><strong>ชื่อผู้เข้าพัก :</strong><font color="#0000FF"><span class="guestname"> null</span></font><span id="tagGuest">(Guest ID : P</span><span class="guestId">1267</span><span id="tagGuest2">  )</span></td>
			<td colspan="2"><strong>วันที่เช็คเอาท์ :&nbsp;</strong><span class="dateCheckout">null</span></td>
		</tr>
		<tr>
			<td width="74">&nbsp;</td>
			<td width="276" rowspan="3" align="left" valign="top"><span class="address" >null</span></td>
			<td colspan="2" ><strong>จำนวนคืน :&nbsp;</strong><span class="daySpan">null</span></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td colspan="2"><strong>ผู้ใหญ่ : &nbsp;</strong><span class="adult">null</span></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td colspan="2"><strong>เด็ก :&nbsp;</strong><span class="child">null</span></td>
		</tr>
		<tr>
			<td colspan="2" ><strong>เอเจนซี่ :&nbsp;&nbsp;&nbsp;</strong><span class="agency">null</span></td>
			<td width="150">&nbsp;</td>
			<td width="72">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2" ><strong>โทรศัพท์ :&nbsp;</strong><span class="tel">null</span></td>
			<td><strong>ยอดรวม :</strong></td>
			<td><span class="total" style="padding-right:40; float:right;white-space:nowrap;">null</span></td>
		</tr>
		<tr>
			<td colspan="2"><strong>อีเมล์ :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong><span class="email">null</span></td>
			<td><strong>จ่าย :</strong></td>
			<td><span class="pay" style="padding-right:40;float:right;white-space:nowrap;">null</span></td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
			<td><strong>คงเหลือ :</strong></td>
			<td><span class="remain" style="padding-right:40;float:right;white-space:nowrap;"> null</span></td>
		</tr>
		<tr>
			<td colspan="2"><strong>อัตราค่าห้องพัก : &nbsp;</strong><span class="seasonalRate">null</span></td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2">&nbsp;</td>
			<td><strong>ยอดรวมกลุ่ม</strong></td>
			<td><span class="totalG" style="padding-right:40;float:right;white-space:nowrap;"> null</span></td>
		</tr>
		<tr>
			<td colspan="2" >&nbsp;</td>
			<td><strong>ยอดจ่ายกลุ่ม</strong></td>
			<td><span class="payG" style="padding-right:40;float:right;white-space:nowrap;"> null</span></td>
		</tr>
		<tr>
			<td colspan="2" >&nbsp;</td>
			<td><strong>ยอดคงเหลือกลุ่ม</strong></td>
			<td><span class="remainG" style="padding-right:40;float:right;white-space:nowrap;"> null</span></td>
		</tr>
	</table>
	<hr>
	<table width="572" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="65"><input type="button" name="button" id="button" value="พิมพ์ใบจอง" class="btn"/></td>
			<td width="65"><input type="button" name="button2" id="button2" value="ส่งอีกเมลล์" class="btn"/></td>
			<td width="65"><input type="button" name="button3" id="button3" value="ส่งอีกเมลล์กลุ้ม" class="btn"/></td>
			<td width="239">&nbsp;</td>
			<td width="56"><input type="button" name="button4" id="btnEditG" value="แก้ไข" class="btn" onclick="CallEditReservedPageWithLoadElement(id,$('#BookingDetailsG').get(0).resId);"/></td>
			<td width="56"><input type="button" name="button5" id="closeG" value="ปิด" class="btn" onclick="closeDialog(id);"/></td>
		</tr>
	</table>

	</form>
</div>
<div id="BookingG" style="display:none">
	<form id="form1" name="form1" method="post" action="">
	<div id="row1">
		<table height="30">
			<tr>
				<td width="113px">
				<b><%out.print(resource.getString("Popup.lengthofstay"));%></b>
				</td>
				<td width="83px">
				<b>&nbsp;&nbsp;&nbsp;<%out.print(resource.getString("Popup.roomamount"));%></b>
				</td>
				<td width="142px">
				<b>&nbsp;<%out.print(resource.getString("Popup.seasonalrate"));%></b>    
				</td>
				<td width="125px">
				<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%out.print(resource.getString("Popup.adult"));%></b>
				</td>
				<td width="136px">
				<b>&nbsp;&nbsp;<%out.print(resource.getString("Popup.children"));%></b>
				</td>
				<td width="134px">
				<b><span style="float:right">ราคา</span></b>
				</td>
			</tr>
		</table>
	</div>
	<div id="row2">
		<table height="30">
		<tr>
			<td width="130px"><b><span id="dateStart"></span> - <span id="dateEnd"></span></b></td>
			<td width="76px"><select name="roomAmount3" id="roomAmount3"  onchange="occChange()"> <option value="1">1</option></select></td>
			<td width="243px"><select name="SeasonalRate" id="SeasonalRate" style='width:197px' onchange="resonalrateChange()"></select></td>
			<td width="42px"><select name="adult3" id="adult3" style="width:37px" onchange="occChange();"></select></td>
			<td width="42px"><select name="child3" id="child3" style="width:37px" onchange="occChange();"><option value="0">0</option></select></td>
			<td width="216px"><b><span style="float:right" id="g1">&nbsp;฿</span><span style="float:right" id="dep">0</span></b></td>
		</tr>
		</table>
	</div>
	<div id="row3" >
		<span>
			<select name="salutation3" id="salutation3" >
			<option value="0"><%out.print(resource.getString("Popup.salutation"));%></option>
			</select>
		</span>
		<span>
			<input id="name3" type="text" value="" placeholder="<%out.print(resource.getString("Popup.name"));%>"  onkeypress="next(this,event)"/>
		</span>
		<span>
			<input id="lastname3" type="text" value="" placeholder="<%out.print(resource.getString("Popup.lastname"));%>"  onkeypress="next(this,event)"/>
		</span>
		<span>
			<input id="tel3" type="text" value="" placeholder="<%out.print(resource.getString("Popup.mobile"));%>" onkeypress="next(this,event)"/>
		</span>
	</div>

	<div id="row4">
		<span>
			<input id="email3" type="text" value="" placeholder="<%out.print(resource.getString("Popup.email"));%>" onkeypress="next(this,event)"/>
		</span>
		<span>
			<input id="pledge" type="text" value="999.00" size="9" onchange="chkNum(this);" onkeypress="next(this,event)" />
		</span>
		<span class="keep_right">
			<font color="#0033FF">Credit Card Guraantee</font> / มัดจำเงินสด 
		</span>
	</div>
	</form>

	<div id="row5" style="display:none"><br/><br/>
		<table width="100%" height="50px" class="line">
			<tr>
				<td width="24%"><span><b>เอเยนต์และองค์กร </b></span></td>
				<td width="72%"><span><b>อัตราค่าห้องพัก</b></span></td>
				<td width="4%"><span><b>ราคา</b></span></td>
			</tr>
			<tr>
				<td width="100%" colspan="3">
					<div id = "row6" style="display:none;">
						<span><input id="nameAgent3" type="text" value="" placeholder="<%out.print(resource.getString("Popup.name"));%>"  /> 
						</span>
						<select name="SeasonalRate3" id="SeasonalRate3" onchange="resonalrateChange()"></select>
						<b><span id="g2">&nbsp;฿</span><span id="dep3">0</span></b>
					</div>
				</td>
			</tr>
		</table>
</div>
<div id="btn">
<table width="100%">
<tr>
<td width="40%">
<span>
<button onclick="swapBooking(this)" id="commoncus" class="btn" ><%out.print(resource.getString("Popup.btnText.agent"));%></button> 
</span>
</td>
<td width="60%">
<span>
<button onclick="checkPopup(this)" id="checkin"  class="btn" ><%out.print(resource.getString("Popup.btnText.checkin"));%></button> 
</span>
<span>
<button onclick="checkPopup(this)" id="booking" class="btn" ><%out.print(resource.getString("Popup.btnText.reserve"));%></button> 
</span>
<span>
<button onclick="checkPopup(this)" id="tempbooking" class="btn" ><%out.print(resource.getString("Popup.btnText.tempReserve"));%></button> 
</span>
<span>
<button onclick="checkPopup(this)" id="detailbooking"  class="btn" >Detail Booking</button> 
</span>
</td>
</tr>
</table>
</div>
</div>

<div id="loadingScreen"></div>


<div id="AddToNewGroup" style="display:none">
	<center><div id="textDataAddToNewGroup">
		<form>
			<table class="addnewGroup">
				<tr>
					<td align="left"><%out.print(resource.getString("RoomManagementList.popup.addnewGroup.salutation"));%></td>
					<td align="left"><%out.print(resource.getString("RoomManagementList.popup.addnewGroup.fristName"));%></td>
					<td align="left"><%out.print(resource.getString("RoomManagementList.popup.addnewGroup.lastName"));%></td>
					<td><%out.print(resource.getString("RoomManagementList.popup.addnewGroup.phone"));%></td>
					<td>&nbsp;</td>
					<td><%out.print(resource.getString("RoomManagementList.popup.addnewGroup.guest"));%></td>
				</tr>
				<tr>
					<td align="left"><select id="AddToGroupSolutation"></select></td>
					<td align="left"><input type="text" id="addToGroupFName" placeholder="First Name"></td>
					<td align="left"><input type="text" id="addToGroupLName" placeholder="First Name"></td>
					<td align="left"><input type="text" id="addToGroupPhone" placeholder="Phone" size="10"></td>
					<td>&nbsp;</td>
					<td>--</td>
				</tr>
			</table>
		</form>
	</div></center>
</div>